home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / www / library / implemen / htlex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.4 KB  |  63 lines

  1. /*                         LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES)
  2.                                              
  3.  */
  4.  
  5. #ifndef HTLEX_H
  6. #define HTLEX_H
  7.  
  8. #include "HTUtils.h"
  9.  
  10.  
  11. #ifdef SHORT_NAMES
  12. #define lex_verb        lex_verbose
  13. #endif /*SHORT_NAMES*/
  14.  
  15.  
  16. typedef enum {
  17.     LEX_NONE,           /* Internally used      */
  18.     LEX_EOF,            /* End of file          */
  19.     LEX_REC_SEP,        /* Record separator     */
  20.     LEX_FIELD_SEP,      /* Field separator      */
  21.     LEX_ITEM_SEP,       /* List item separator  */
  22.     LEX_OPEN_PAREN,     /* Group start tag      */
  23.     LEX_CLOSE_PAREN,    /* Group end tag        */
  24.     LEX_AT_SIGN,        /* Address qualifier    */
  25.     LEX_ALPH_STR,       /* Alphanumeric string  */
  26.     LEX_TMPL_STR        /* Template string      */
  27. } LexItem;
  28.  
  29. extern char lex_buffer[];       /* Read lexical string          */
  30. extern int lex_line;            /* Line number in source file   */
  31.  
  32. /*
  33.  
  34. Get Next Lexical Item
  35.  
  36.    If returns LEX_ALPH_STR or LEX_TMPL_STR the string is in global buffer lex_buffer.
  37.    
  38.  */
  39.  
  40. PUBLIC LexItem lex PARAMS((FILE * fp));
  41. /*
  42.  
  43. Push Back Latest Item
  44.  
  45.  */
  46.  
  47. PUBLIC void unlex PARAMS((LexItem lex_item));
  48. /*
  49.  
  50. Get the Name for Lexical Item
  51.  
  52.  */
  53.  
  54. PUBLIC char *lex_verbose PARAMS((LexItem lex_item));
  55. /*
  56.  
  57.  */
  58.  
  59. #endif /* not HTLEX_H */
  60. /*
  61.  
  62.    End of file HTLex.h.  */
  63.